<template>
  <div class="video-status">
    <div
      class="signal"
      v-show="pubMediaStatus !== '' && subMediaStatus !== ''"
    >
      <!-- <div class="customer">
        <p>访客流</p>
        <ul>
          <li>
            <span class="des">码率</span>
            <span>{{ pubMediaStatus.bytesSent }}</span>
          </li>
          <li>
            <span class="des">丢包率</span>
            <span>{{ pubMediaStatus.packetsRate }}</span>
          </li>
          <li>
            <span class="des">分辨率</span>
            <span>{{ pubMediaStatus.resolution }}</span>
          </li>
        </ul>
      </div>
      <div class="agent">
        <p>坐席流</p>
        <ul>
          <li>
            <span class="des">码率</span
            ><span>{{ subMediaStatus.bytesReceived }}</span>
          </li>
          <li>
            <span class="des">丢包率</span
            ><span>{{ subMediaStatus.packetsRate }}</span>
          </li>
          <li>
            <span class="des">分辨率</span
            ><span>{{ subMediaStatus.resolution }}</span>
          </li>
          <li>
            <span class="des">延时</span
            ><span>{{ subMediaStatus.delayMs }}</span>
          </li>
          <li v-show="subMediaStatus.jitterBufferMs">
            <span class="des">抖动</span
            ><span>{{ subMediaStatus.jitterBufferMs }}</span>
          </li>
        </ul>
      </div> -->
    </div>
  </div>
</template>

<script>
import { subscriptionGetStats } from '@/utils/webStatus'
export default {
    props: {
        pubMediaStatus: {
            type: Object,
            defualt: () => {}
        },
        subMediaStatus: {
            type: Object,
            default: () => {}
        },
        webStats: {
            tpye: Object,
            default: () => {}
        },
    },
    data() {
        return {}
    },
    mounted() {
        console.log(this.webStats);
        let intervalId = subscriptionGetStats(this.webStats, 3000, res => {
            console.log(res);
        }, err => {
            console.log(err);
        })
    }
};
</script>

<style>
</style>